home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / LetLoveEnergy.swf / scripts / frame_747 / PlaceObject2_137_5 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-05  |  979 b   |  41 lines

  1. onClipEvent(enterFrame){
  2.    if(_name ne "boulder" && alive && _root.man0.active)
  3.    {
  4.       currentx = Internal_X + _root.man0.offsetX;
  5.       currenty = Internal_Y + _root.man0.offsetY;
  6.       if(currentx < 600 && -100 < currentx && -100 < currenty && currenty < 400)
  7.       {
  8.          onscreen = true;
  9.       }
  10.       else
  11.       {
  12.          onscreen = false;
  13.          _visible = false;
  14.       }
  15.       if(onscreen)
  16.       {
  17.          _visible = true;
  18.          _X = currentx;
  19.          _Y = currenty;
  20.       }
  21.       if(mover)
  22.       {
  23.          Internal_X += VelX;
  24.          Internal_Y += VelY;
  25.          movercounter++;
  26.          if(200 < movercounter && !moveforwards)
  27.          {
  28.             moveforwards = true;
  29.             movercounter = 0;
  30.             VelX = 4;
  31.          }
  32.          else if(200 < movercounter && moveforwards)
  33.          {
  34.             moveforwards = false;
  35.             movercounter = 0;
  36.             VelX = -4;
  37.          }
  38.       }
  39.    }
  40. }
  41.